import { createRouter, createWebHashHistory, type RouteRecordRaw } from "vue-router";

const staticRoutes:Array<RouteRecordRaw> =   [
    {
        path:"/",
        name:"home",
        component:()=>import("../pages/home/index.vue")
    },
    {
		path: '/test/dw',
		name: 'dw',
		component: () => import('../pages/test/dw.vue'),
	},
    {
		path: '/test/cxdw',
		name: 'cxdw',
		component: () => import('../pages/test/cxdw.vue'),
	},
    {
		path: '/test/dh',
		name: 'dh',
		component: () => import('../pages/test/dh.vue'),
	},
    {
		path: '/test/dx',
		name: 'dx',
		component: () => import('../pages/test/dx.vue'),
	},
    {
		path: '/test/lp',
		name: 'lp',
		component: () => import('../pages/test/lp.vue'),
	},
    {
		path: '/test/ewm',
		name: 'ewm',
		component: () => import('../pages/test/ewm.vue'),
	},
    {
		path: '/test/tupian',
		name: 'tupian',
		component: () => import('../pages/test/tupian.vue'),
	},
    {
		path: '/test/mtzy',
		name: 'mtzy',
		component: () => import('../pages/test/mtzy.vue'),
	},
    {
		path: '/test/luyin',
		name: 'luyin',
		component: () => import('../pages/test/luyin.vue'),
	},
    {
		path: '/test/wjxz',
		name: 'wjxz',
		component: () => import('../pages/test/wjxz.vue'),
	},
    {
		path: '/test/wjsc',
		name: 'wjsc',
		component: () => import('../pages/test/wjsc.vue'),
	}
];


export const router = createRouter({
	history: createWebHashHistory(),
	/**
	 * 说明：
	 * 1、notFoundAndNoPower 默认添加 404、401 界面，防止一直提示 No match found for location with path 'xxx'
	 * 2、backEnd.ts(后端控制路由)、frontEnd.ts(前端控制路由) 中也需要加 notFoundAndNoPower 404、401 界面。
	 *    防止 404、401 不在 layout 布局中，不设置的话，404、401 界面将全屏显示
	 */
	routes: [...staticRoutes],
});


export default router;